package com.hzp.micromall.common.core.exception;

import com.hzp.micromall.common.core.api.IErrorCode;

/**
 * @Author houzipeng
 * @Date 2022/2/16 20:51
 * @Version 1.0
 * 断言处理类，用于抛出各种API异常
 */
public class Asserts {
    public static void fail(String message) {
        throw new ApiException(message);
    }

    public static void fail(IErrorCode errorCode) {
        throw new ApiException(errorCode);
    }
}